import React, { Component } from 'react';
import axios from 'axios'

export default class Home extends Component {
    clickTest = function clickTest() {
        alert('click');
        axios.get('https://netcore.miniprogram.icu/WeatherForecast')
            .then(m => alert(m.data));

        alert('test fetch');
        fetch('https://netcore.miniprogram.icu/WeatherForecast')
            .then(Response => Response.json())
            .then(data => alert(data));
    }
    render() {
        return (
            <div className="App">
                <h1>欢迎，这里是Home</h1>
                <button onClick={this.clickTest}> test </button>
            </div>)
    }
}